package com.example.demo.typeEnums;

/**
 * mysql 数据库时间类型枚举
 */
public enum MysqlTimeEnum {

    DATE("date"),

    TIME("time"),

    DATETIME("datetime"),

    TIMESTAMP("timestamp");

    private String name;

    MysqlTimeEnum(String name){
        this.name = name;
    }

    public static boolean isMysqlTimeEnum(String name){
        for(MysqlTimeEnum timeEnum : MysqlTimeEnum.values()){
            if(timeEnum.name.equals(name)){
                return true;
            }
        }
        return false;
    }
}
